<template>
  <div>
    <template v-if="user">
      <van-cell title="当前用户" :value="user?.username"/>
      <van-cell title="修改信息" is-link to="/user/update" />
      <van-cell title="我的关注" is-link to="/user/follow" />
      <van-cell title="我的粉丝" is-link to="/user/followMe" />
    </template>
  </div>
</template>

<script setup lang="ts">

import {useRoute, useRouter} from "vue-router";
import {onMounted, ref} from "vue";
import {UserType} from "../model/user";
import {getCurrentUser} from "../states/user";

const user = ref<UserType>();

onMounted(async () => {
  user.value = await getCurrentUser();
})

</script>

<style scoped>

</style>
